public abstract class CaffeineBeverage
{

    final void prepareRecipe()
    {
        boilWater();
        brew();
        pourInCup();
        addCondiments();
    }

    abstract void brew();

    abstract void addCondiments();

    void boilWater()
    {
        System.out.println("boilWater");
    }

    void pourInCup()
    {
        System.out.println("pourInCup");
    }
}